package com.dong.design.builder;

/**
 * 建造者模式
 * 根据你的选择，把已經准备好的套餐送給你
 * @author jianyang206881
 * @date 2018/6/8
 */
public class BuilderPatternDemo {

    public static void main(String[] args) {
        MealBuilder mealBuilder = new MealBuilder();

        Meal vegMeal = mealBuilder.prepareVegMeal();
        System.out.println("Veg Meal");
        vegMeal.showItem();;
        System.out.println("Total Cost: " + vegMeal.getCost());

        Meal chickenMeal = mealBuilder.prepareChickenMeal();
        System.out.println("Chicken Meal");
        chickenMeal.showItem();
        System.out.println("Total Cost: " + chickenMeal.getCost());
    }

}
